home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 March / PCWorld_2002-03_cd.bin / Software / TemaCD / xteq / setup.exe / {app} / plugins / XQ IUnknown File.xpl < prev    next >
Text File  |  2001-01-21  |  2KB  |  61 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="1"
  3. "COUNT"="1"
  4. "UIPATH"="Appearance\Files&Folders\ANY file"
  5. "NAME"="Unknown File Command"
  6. "VERSION"="1.20"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Command"
  9. "DESCRIPTION 1"="Normally, Windows displays a dialog if you double-click a file with an unknown extension (for example TEXT.XXX)."
  10. "DESCRIPTION 2"="With this setting, you can specify a program that should be used for EVERY unknown file."
  11. "DESCRIPTION 3"="A common command for this is <NOTEPAD "%1"> which means all unknown files are opened with Notepad. The current filename is inserted where Windows finds "%1"."
  12. "DESCRIPTION 4"="To deactivate this setting, clear the Command field and click Apply."
  13. "AUTHOR"="Xteq Systems"
  14. "CONTACTURL"="http://www.xteq.com"
  15. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  16. "COMMENT 1"=" "
  17. "COMMENT 2"="Thanks to alexmorris@uk.ibm.com for the W2K tip!"
  18.  
  19.  
  20. 'HKLM\Software\Classes\Unknown\Shell\Open\Command
  21.  
  22. sP="HKCR\Unknown\Shell\Open\Command\@"
  23. sP2="HKCR\Unknown\Shell\@"
  24. sP2_cmd="open"
  25.  
  26. sP_r1="HKCR\Unknown\Shell\Open\Command"
  27. sP_r2="HKCR\Unknown\Shell\Open"
  28.  
  29. Sub Plugin_Initialize 
  30.  s=RegReadValue(sp)
  31.  Call SetUIElement(1,s)
  32. End Sub
  33.  
  34. Sub Plugin_CheckData(ElementIndex)
  35. End Sub
  36.  
  37. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  38.  s=GetUIElement(1)
  39.  
  40.  if len(s)=0 then
  41.     'Remove
  42.  
  43.     e=RegReadValue(sP)
  44.     if IsEmpty(e)=false then       
  45.         Call RegDeleteValue(sP)
  46.         Call RegDeletePath(sP_r1)
  47.         Call RegDeletePath(sP_r2)
  48.  
  49.         Call RegWriteValue(sP2,"",1)
  50.     end if
  51.  
  52.  else
  53.     'Add
  54.     Call RegWriteValue(sP,s,1)
  55.     Call RegWriteValue(sP2,sP2_cmd,1)
  56.  end if
  57. End Sub
  58.  
  59. Sub Plugin_Terminate 
  60. End Sub
  61.